1. Field of the Invention
The present invention relates to a storage device, and more particularly, to a storage device with automatic interface-switching function.
2. Description of the Prior Art
Please refer to FIG. 1. FIG. 1 is a diagram illustrating a conventional hard disk external box 100. The hard disk external box comprises a Serial Advanced Technology Attachment (SATA) connector 101, a Universal Serial Bus (USB) connector 102, a USB/SATA converting controller 103, a regulator 104, an analog switch 105, and a hard disk 106. The hard disk external box 100 transmits data between the computer 109 through the SATA interface 107 and the USB interface 108. In this way, the data of the computer 109 can be saved in the hard disk 106. The hard disk 106 is a hard disk of SATA interface, which means the hard disk 106 transmits data through SATA interface and receives data through SATA interface.
The SATA connector 101 is coupled to the SATA interface 107 of the computer 109 for transmitting SATA signals to the hard disk 106 through the analog switch 105. The USB connector 102 is connected to the USB interface 108 of the computer 109 for transmitting USB signals to the USB/SATA converting controller 103. The USB/SATA converting controller 103 converts the received USB signals into SATA signals and transmits to the hard disk 106 through the analog switch 105. The regulator 104 is coupled to the USB/SATA converting controller 103 for converting a power supply to the power supply the USB/SATA converting controller 103 needs. The analog switch 105 comprises a control end C, a first end 1, a second end 2, and an output end O. The analog switch 105 couples the first end 1 or the second end 2 to the output end O according to the received command X on the control end C. That is, the analog switch 105 transmits SATA signals from the USB/SATA converting controller 103 or the SATA connector 101 to the hard disk 106 according to the command X.
The command X is manual. For example, when a user need to couple the first end 1 and the output end O of the analog switch 105, he or she has to manually issue the command X to the analog switch 105 to couple the first end 1 and the output end O. However, the hard disk external box 100 only couples one of the SATA interface 107 and the USB interface 108 for exchanging data with the computer 109. Thus, when the hard disk external box 100 couples to the SATA interface 107, the user has to manually switch the analog switch 105 for coupling the second end 2 and the output end O so that the received data by the SATA connector 101 is able to transmit to the hard disk 106. When the hard disk external box 100 couples to the USB interface 108 of the computer 109, the user has to manually switch the first end 1 coupled to the output end O so that the data converted by the USB/SATA converting controller 103 is able to transmit to the hard disk 106. In this way, the user has to manually switch the analog switch 105 every time when the hard disk external box 100 is coupled to the computer 109, which is not convenient.